import { createRouter, createWebHistory } from 'vue-router';
//导入组件
import LoginVue from '@/views/Login.vue';
import LayoutVue from '@/views/Layout.vue';
import dailymanage from '@/views/book/dailymanage.vue';//``````````````````````````````````````````
import TrafficPathManageVue from '@/views/book/TrafficPathManage.vue';
import TravelVue from '@/views/book/Travel.vue';
import UserInfoVue from '@/views/user/UserInfo.vue';
import UserResetPasswordVue from '@/views/user/UserResetPassword.vue';
import UserAvatarVue from '@/views/user/UserAvatar.vue';

import clientmanage from '@/views/book/clientmanage.vue';//````````````````````````````````````````
import movemanage from '@/views/book/movemanage.vue';//````````````````````````````````````````
import usermanage from '@/views/book/usermanage.vue';//````````````````````````````````````````
import productionpsmanage from '@/views/book/productionpsmanage.vue';//````````````````````````````````````````
import PersonSchedulVue from '@/views/book/PersonSchedul.vue';
import productionmanage from '@/views/book/productionmanage.vue';//````````````````````````````````````````````````
import areamanage from '@/views/book/areamanage.vue';
import CheckResultVue3 from '@/views/book/clientcome.vue';
import StorageInquiryVue from '@/views/book/StorageInquiry.vue';
import CheckResultVue5 from '@/views/book/CheckResult5.vue';
import companymsgmanage from '@/views/book/companymsgmanage.vue';

import ChanceLogVue from '@/views/book/chancelog.vue';
import ChancePassVue from '@/views/book/chancepass.vue';
import ChanceTraceVue from '@/views/book/chancetrace.vue';
//定义路由关系
const routes = [
    { path: '/login', component: LoginVue },
    {
        path: '/', component: LayoutVue,
        redirect: '/user/info', //重定向
        children: [
            { path: '/daily/manage', component: dailymanage },//````````````````````````日常管理························
            { path: '/staff/manage', component: TrafficPathManageVue },
            { path: '/productionps/manage', component: productionpsmanage },//```````````价格本管理````````````````````
            { path: '/person/schedul', component: PersonSchedulVue },
            { path: '/production/manage', component: productionmanage },//`````````````````产品管理``````````````````````
            { path: '/area/manage', component: areamanage },
            { path: '/client/manage', component: clientmanage },
            { path: '/move/manage', component: movemanage },
            { path: '/user/manage', component: usermanage },
            { path: '/client/come', component: CheckResultVue3 },
            { path: '/storage/inquiry', component: StorageInquiryVue },
            { path: '/check/result5', component: CheckResultVue5 },
            { path: '/company/msg/manage', component: companymsgmanage },//`````````````````公司信息发布管理```````````````````
            { path: '/travel', component: TravelVue },
            { path: '/user/info', component: UserInfoVue },
            { path: '/user/resetPassword', component: UserResetPasswordVue },
            { path: '/user/avatar', component: UserAvatarVue },
            { path: '/chance/log', component: ChanceLogVue },
            { path: '/chance/pass', component: ChancePassVue },
            { path: '/chance/trace', component: ChanceTraceVue },
        ]
    },
]
//创建路由器
const router = createRouter({
    history: createWebHistory(),
    routes: routes,
})
//导出路由
export default router